import http from '@/common/js/httpRequest'
//发起或者重新发起
export function sendEnv (data) {
  let url = data.envMergeId ? '/api/env/resend' : '/api/env/send'
  return http({
    method: 'post',
    url: url,
    data,
    openDefultdata: true
  })
}
//列表
export function envList (params) {
  return http({
    method: 'get',
    url: '/api/env/list',
    params
  })
}
//获取占用信息
export function envOccupy (data) {
  return http({
    method: 'post',
    url: '/api/env/occupy',
    data
  })
}
//获取环境信息
export function getEnvInfo (params) {
  return http({
    method: 'get',
    url: '/api/env/info',
    params
  })
}
//退回
export function returnEnv (data) {
  return http({
    method: 'post',
    url: '/api/env/return',
    data
  })
}
//审核通过
export function auditPass (data) {
  return http({
    method: 'post',
    url: '/api/env/audit/pass',
    data
  })
}
//填写保存
export function saveEnvWrite (data) {
  return http({
    method: 'post',
    url: '/api/env/write/save',
    data,
    openDefultdata: true
  })
}
//作废
export function cancelEnv (data) {
  return http({
    method: 'post',
    url: '/api/env/cancel',
    data
  })
}